package com.newzqxq.common.utils;

import com.baomidou.mybatisplus.plugins.Page;

/**
 * @author 石清
 * @Description
 * @create 2017-12-04 16:48
 **/
public class PageCopy {
    public static Page copyProperty(Page pageTarget, Page pageRes){
        if (null == pageTarget){
            return new Page();
        }
        pageRes=new Page();
        pageRes.setCondition(pageTarget.getCondition());
        pageRes.setCurrent(pageTarget.getCurrent());
        pageRes.setTotal(pageTarget.getTotal());
        pageRes.setSize(pageTarget.getSize());
        pageRes.setOrderByField(pageTarget.getOrderByField());
        return pageRes;
    }
}
